<?php

require_once ('library/Zend/Controller/Plugin/Abstract.php');
include_once 'library/Zend/Session/Namespace.php';
class Txy_Extends_PluginAcl extends Zend_Controller_Plugin_Abstract {
	public function preDispatch(Zend_Controller_Request_Abstract $request){
		$modelName=$request->getModuleName();
		if('admin'==$modelName){
			$usersNs = new Zend_Session_NameSpace("users");
			If('admin'!=$usersNs->userType){
				$request->setControllerName('index');
				$request->setActionName('login');
			}
		}
	}
}

?>